#pragma once

#define  PUBLIC_DNS_LIST       "publicdns.bnbt.net"
#define  PUBLIC_DNS_REFRESH    (3600*1000)

int GetDnsServerArray( IP4_ARRAY* lpDnsArray, BOOL must_remote = FALSE );

int  GetPublicSrvRecord( const char* lpSrvRecord, char* lpDomain, u_short* lpPort, LPWORD lpWeight = NULL, LPWORD lpPriority = NULL );

int  GetPublicTxtRecord( const char* lpSrvRecord, char* lpDomain, u_short* lpPort );


ULONG  GetPublicHostRecord( const char* name, BOOL useLocalDNS = TRUE );

BOOL GetPublicHostRecord( const char* name, PIP4_ARRAY lpIPArray,  BOOL useLocalDNS = TRUE  );

ULONG GetPublicHostRecord( PIP4_ARRAY lpDnsArray, const char* name );

string  GetDnsTxtRecord(  const char* name );

int GetHostRecord( const char* szHostName, PIP4_ARRAY lpIpArray );

ULONG GetHostRecord( const char* szHostName );
